#include "wode.h"
#include "ui_wode.h"
#include "statistics.h"
#include "taskpage.h"
#include "tomatoclock.h"
#include "achieve.h"
#include "ui_achieve.h"
#include "name.h"
#include "ui_name.h"
#include "shezhi.h"

Wode::Wode(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Wode)
{
    ui->setupUi(this);

    //四个菜单按钮
    ui->start->setStyleSheet(
        "QPushButton {"
        "background-color: rgba(255, 255, 255, 128);"
        "color: #91ada2;"
        "}"
        );
    ui->wode->setStyleSheet(
        "QPushButton {"
        "background-color: rgba(255, 255, 255, 128);"
        "color: #91ada2;"
        "}"
        );
    ui->task->setStyleSheet(
        "QPushButton {"
        "background-color: rgba(255, 255, 255, 128);"
        "color: #91ada2;"
        "}"
        );
    ui->pushButton_4->setStyleSheet(
        "QPushButton {"
        "background-color: rgba(255, 255, 255, 128);"
        "color: #91ada2;"
        "}"
        );
    //内部小控件
    ui->frame->setStyleSheet(
            "QFrame {"
            " background-color: transparent;"
            "}"
        );
    ui->frame_2->setStyleSheet(
        "QFrame {"
        " background-color: transparent;"
        "}"
        );
    ui->frame_3->setStyleSheet(
        "QFrame {"
        " background-color: transparent;"
        "}"
        );
}

Wode::~Wode()
{
    delete ui;
}

void Wode::on_start_clicked()
{
    tomatoclock *w=new tomatoclock;
    this->close();
    w->show();
}//切换首页


void Wode::on_pushButton_4_clicked()
{
    Statistics *s=new Statistics;
    this->close();
    s->show();
}//切换到统计


void Wode::on_wode_clicked()
{
    TaskPage *t=new TaskPage;
    this->close();
    t->show();
}//切换到任务集


void Wode::on_task_clicked()
{
    TaskPage *t1=new TaskPage;
    this->close();
    t1->show();
}//切换到任务集


void Wode::on_pushButton_clicked()
{
    name *n=new name;
    n->show();
}//修改名字头像


void Wode::on_pushButton_2_clicked()
{
    Achieve*g_achieve=new Achieve;
    g_achieve->show();
}//查看成就


void Wode::on_pushButton_3_clicked()
{
    Shezhi *s=new Shezhi;
    s->show();
}//设置

